<f:view xmlns="http://www.w3.org/1999/xhtml" xmlns:f="http://java.sun.com/jsf/core"
	xmlns:w="http://www.apusic.com/jsf/widget" xmlns:layout="http://www.apusic.com/jsf/layout"
	xmlns:ui="http://java.sun.com/jsf/facelets" xmlns:ajax="http://www.apusic.com/jsf/ajax"
	xmlns:h="http://java.sun.com/jsf/html">
		<ui:composition>
			<w:button jsvar="attMgtRefresh" value="" immediate="true" action="#{beanName.refreshAttachment}" style="display:none" />
			<w:button jsvar="directSubmit" value="" immediate="true" action="#{beanName.submitModel2}" style="display:none" />
			<w:button jsvar="checkSubmit" value="" immediate="true" action="#{beanName.submitModel}" style="display:none" />
			<w:button jsvar="specifyUnAutoNextPerformer" value="" immediate="true" action="#{beanName.specifyUnAutoNextPerformer}" style="display:none" />
			<script type="text/javascript">
			//<![CDATA[
				function refreshAttMgt() {					 
					 window.setTimeout("ajaxInvoke(attMgtRefresh);", 50);
				}
				
				function ajaxInvoke(source) {
				     if (document.createEvent) {
					     var evObj = document.createEvent('MouseEvents');
					     evObj.initEvent( 'click', true, false );
					     source.dispatchEvent(evObj);
				     } else if (document.createEventObject) {
				     	 source.fireEvent('click');
				     }
				}
				var lastCaller = null;
				function showSubmitWarn(msg) {
					if(!confirm("#{msgs['msgaddParticipants']}\r\n\r\n" + msg)) 
					{
						window.setTimeout("ajaxInvoke(directSubmit);", 50);
					}
					else
					{
					     lastCaller = afterSpecifyPerformer;
					     window.setTimeout("ajaxInvoke(specifyUnAutoNextPerformer);", 50);
					}
					//window.setTimeout("ajaxInvoke(checkSubmit);", 50);
				}

				function afterSpecifyPerformer()
				{
			            window.setTimeout("ajaxInvoke(checkSubmit);", 50);
				}
			//]]>    
			</script>
		</ui:composition>
</f:view>